<?php

if (isset ($_GET['etudiant'])) {

	$connexion = mysql_connect("localhost", "root", "");
	mysql_select_db("etunote", $connexion);
	
	extract($_GET);
	enregister($etu, $etudiant, $url);
}else{
	echo "Y'a RIEN !!";
}

function enregister($etudiant, $exercice, $note) {
	$sql = "INSERT INTO devoir(etudiant, exercice, note) VALUES ('$etudiant', '$exercice', '$note') ";
	mysql_query($sql) or die('Requête invalide : ' . mysql_error());
	
}

?>
